package com.dragee.modules.work.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.dragee.utils.excel.FieldDispose;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 订单表
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-06-16 15:08:48
 */
@Data
@TableName("t_order")
public class OrderEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @ExcelIgnore
    private Long id;
    /**
     * 店铺id
     */
    @ExcelProperty(value = "店铺id")
    @FieldDispose(value = "shopId")
        private String shopId;
    /**
     * 项目id
     */
    @ExcelProperty(value = "项目id")
    @FieldDispose(value = "projectId")
        private String projectId;
    /**
     * 项目名
     */
    @ExcelProperty(value = "项目名")
    @FieldDispose(value = "projectName")
        private String projectName;
    /**
     * 原价
     */
    @ExcelProperty(value = "原价")
    @FieldDispose(value = "price")
        private String  price;
    /**
     * 折后价格
     */
    @ExcelProperty(value = "折后价格")
    @FieldDispose(value = "discountPrice")
        private String discountPrice;

    private String goodsCost;
    /**
     * 应付
     */
    @ExcelProperty(value = "应付")
    @FieldDispose(value = "needPay")
        private String needPay;

    private String sourceType;
    private String clerkId;
    private String manHourCost;
    private String placeOrderType;
    /**
     * 预约时间
     */
    @ExcelProperty(value = "预约时间")
    @FieldDispose(value = "appointTime")
        private String appointTime;

    private Date confirmTime;

//    private String roleName;
    /**
     * 顾客名字
     */
    @ExcelProperty(value = "顾客名字")
    @FieldDispose(value = "customer")
        private String customer;
    /**
     * 顾客手机号
     */
    @ExcelProperty(value = "顾客手机号")
    @FieldDispose(value = "customerTel")
        private String customerTel;
    /**
     * 状态 待商家确认 预约成功 已完成 已评价
     */
    @ExcelProperty(value = "状态 待商家确认 预约成功 已完成 已评价")
    @FieldDispose(value = "status")
        private String status;
    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private String createBy;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Date createTime;
    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @ExcelIgnore
    private String updateBy;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @ExcelIgnore
    private Date updateTime;
    /**
     * 排序字段
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Long sort;

    @TableField(exist = false)
    private ShopProjectEntity project;
    }